<table width="200" height="5" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td></td>
  </tr>
</table>
<table width="1000" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="11" height="96" valign="top">&nbsp;</td>
    <td width="573" valign="top"><table width="568" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td><img src="/img/search/search_r2_c1.jpg" width="568" height="7" /></td>
      </tr>
    </table>
      <table width="568" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td align="center" background="/img/search/search_r4_c1.jpg"><table width="95%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td height="30" align="left" class="titsmall">你输入的关键字为<?php echo $keywords?>，相关搜索结果如下：</td>
            </tr>
          </table>
          	<?php foreach ($result->getResults() as $v):?>
            <table width="95%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td align="left" class="word">
                	<a href="<?php
                		if($type == 1){
                			echo '/scene/intro?id='.$v->getId();
                		}elseif ($type == 2){
                			echo '/food/intro?id='.$v->getId();
                		}else{
                			echo '/eatery/index?id='.$v->getId();
                		}
                	?>">
                		<?php echo $v->getName();?><br />
                	</a>
                	<?php echo $v->getDes();?><br />
                	<?php echo $v->getAddress();?>
                </td>
              </tr>
            </table>
            <table width="95%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td>&nbsp;</td>
              </tr>
            </table>
            <table width="95%" bgcolor="#F8B434" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td height="1"></td>
              </tr>
            </table>
            <table width="95%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td>&nbsp;</td>
              </tr>
            </table>
            <?php endforeach;?>
            <table width="95%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td align="right"><span class="word">当前</span><span class="yh"><?php echo $result->getnbResults()?></span><span class="word">条搜索结果中的</span><span class="yh">
                <?php
                	if($result->getnbResults() < 10){
                		echo $result->getnbResults();
                	}else{
                		echo "10";
                	}
                ?>
                </span><span class="word">条，
                <a href="/search/index?type=<?php echo $type?>&keywords=<?php echo $keywords?>&page=<?php echo $result->getPreviousPage()?>">上一页</a>
                </span> <span class="yh">
                	<?php foreach ( $result->getLinks() as $page ): ?>
						<?php echo link_to_unless($page == $result->getPage(),$page,'/search/index?type='.$type.'&keywords='.$keywords.'&page='.$page) ?>
						<?php echo ($page != $result->getCurrentMaxLink()) ? '-':'' ?>
					<?php endforeach; ?>
               	</span> 
                <span class="word"><a href="/search/index?type=<?php echo $type?>&keywords=<?php echo $keywords?>&page=<?php echo $result->getNextPage()?>">下一页</span></a> </td>
              </tr>
            </table></td>
        </tr>
      </table>
      <table width="568" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><img src="/img/search/search_r17_c1.jpg" width="568" height="5" /></td>
        </tr>
      </table></td>
    <td width="416" valign="top"><table width="400" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td><img src="/img/search/search_r1_c4.jpg" width="400" height="7" /></td>
      </tr>
    </table>
      <table width="400" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td background="/img/search/search_r3_c4.jpg"><table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td height="30" class="tit">推荐线路：</td>
            </tr>
            <?php 
            foreach ($lines as $v):
            	$lineInfo = LinePeer::retrieveByPK($v->getObjectId());
            	if($lineInfo):
            ?>
            <tr>
              <td>
              <a href="/line/index?id=<?php echo $lineInfo->getId()?>">
              	<?php echo $lineInfo->getStart().'->'.$lineInfo->getEnd();?>
              </a>
              </td>
            </tr>
            	<?php endif;?>
            <?php endforeach;?>
          </table></td>
        </tr>
      </table>
      <table width="400" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><img src="/img/search/search_r6_c4.jpg" width="400" height="7" /></td>
        </tr>
      </table>
      <table width="400" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td>&nbsp;</td>
        </tr>
      </table>
      <table width="400" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><img src="/img/search/search_r8_c3.jpg" width="400" height="5" /></td>
        </tr>
      </table>
      <table width="400" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td background="/img/search/search_r9_c3.jpg"><table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td class="tit" height="30">热门景区：</td>
            </tr>
          </table>
            <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
              	<?php
              		$scenes1 = array_slice($scenes,0,4);
              		$scenes2 = array_slice($scenes,4,4);
              		foreach ($scenes1 as $v):
              			$sceneInfo = ScenePeer::retrieveByPK($v->getObjectId());
              			if($sceneInfo):
              	?>
                <td><img src="<?php echo SITE_URL.'uploads/'.$sceneInfo->getImg()?>" width="90" height="70" /></td>
                		<?php endif;?>
                	<?php endforeach;?>
              </tr>
              <tr>
                <?php
              		foreach ($scenes1 as $v):
              			$sceneInfo = ScenePeer::retrieveByPK($v->getObjectId());
              			if($sceneInfo):
              	?>
                <td height="25" align="center" class="word">
                	<a href="/scene/intro?id=<?php echo $sceneInfo->getId()?>">
                		<?php echo $sceneInfo->getName()?>
                	</a>
                </td>
                		<?php endif;?>
                	<?php endforeach;?>
              </tr>
            </table>
            <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <?php
              		foreach ($scenes2 as $v):
              			$sceneInfo = ScenePeer::retrieveByPK($v->getObjectId());
              			if($sceneInfo):
              	?>
                <td><img src="<?php echo SITE_URL.'uploads/'.$sceneInfo->getImg()?>" width="90" height="70" /></td>
                		<?php endif;?>
                	<?php endforeach;?>
              </tr>
              <tr>
                <?php
              		foreach ($scenes2 as $v):
              			$sceneInfo = ScenePeer::retrieveByPK($v->getObjectId());
              			if($sceneInfo):
              	?>
                <td height="25" align="center" class="word">
                	<a href="/scene/intro?id=<?php echo $sceneInfo->getId()?>">
                		<?php echo $sceneInfo->getName()?>
                	</a>
                </td>
                		<?php endif;?>
                	<?php endforeach;?>
              </tr>
            </table></td>
        </tr>
      </table>
      <table width="400" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><img src="/img/search/search_r11_c3.jpg" width="400" height="5" /></td>
        </tr>
      </table>
      <table width="400" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td>&nbsp;</td>
        </tr>
      </table>
      <table width="397" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="7"><img src="/img/search/search_r13_c5.jpg" /></td>
        </tr>
      </table>
      <table width="397" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td background="/img/search/search_r14_c5.jpg"><table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td class="tit" height="30">推荐店铺：</td>
            </tr>
            <tr>
              <td>&nbsp;</td>
            </tr>
          </table>
            <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <?php
              		$eaterys1 = array_slice($eaterys,0,4);
              		$eaterys2 = array_slice($eaterys,4,4);
              		foreach ($eaterys1 as $v):
              			$eateryInfo = EateryPeer::retrieveByPK($v->getObjectId());
              			if($eateryInfo):
              	?>
              	<td><img src="<?php echo SITE_URL.'uploads/'.$eateryInfo->getImg()?>" width="90" height="70" /></td>
                		<?php endif;?>
                	<?php endforeach;?>
              </tr>
              <tr>
              	<?php
              		foreach ($eaterys1 as $v):
              			$eateryInfo = EateryPeer::retrieveByPK($v->getObjectId());
              			if($eateryInfo):
              	?>
                <td height="25" align="center" class="word">
                	<a href="/eatery/index?id=<?php echo $eateryInfo->getId()?>">
                		<?php echo $eateryInfo->getName()?>
            		</a>
                </td>
               			<?php endif;?>
                	<?php endforeach;?>
              </tr>
            </table>
            <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <?php
              		foreach ($eaterys2 as $v):
              			$eateryInfo = EateryPeer::retrieveByPK($v->getObjectId());
              			if($eateryInfo):
              	?>
              	<td><img src="<?php echo SITE_URL.'uploads/'.$eateryInfo->getImg()?>" width="90" height="70" /></td>
                		<?php endif;?>
                	<?php endforeach;?>
              </tr>
              <tr>
                <?php
              		foreach ($eaterys2 as $v):
              			$eateryInfo = EateryPeer::retrieveByPK($v->getObjectId());
              			if($eateryInfo):
              	?>
                <td height="25" align="center" class="word">
                	<a href="/eatery/index?id=<?php echo $eateryInfo->getId()?>">
                		<?php echo $eateryInfo->getName()?>
            		</a>
               	</td>
               			<?php endif;?>
                	<?php endforeach;?>
              </tr>
            </table></td>
        </tr>
      </table>
      <table width="397" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><img src="/img/search/search_r16_c5.jpg" width="397" height="8" /></td>
        </tr>
      </table></td>
  </tr>
</table>
</body>
</html>
